package com.example.studentalarm.bean;

import com.example.studentalarm.utils.SoundConfigUtils;

public class AlarmConfigBean {
    /**
     * 是否开启铃声
     */
    private boolean isMusic;
    /**
     * 是否开启振动
     */
    private boolean isVibration;


    public boolean isMusic() {
        return isMusic;
    }

    public void setMusic(boolean music) {
        isMusic = music;
    }



    public boolean isVibration() {
        return isVibration;
    }

    public void setVibration(boolean vibration) {
        isVibration = vibration;
    }

    public SoundConfigUtils.RingerMode getRingerMode(){
        if (isMusic&&isVibration){
            return SoundConfigUtils.RingerMode.RINGER_MODE_NORMAL;
        }
        if (isMusic){
            return SoundConfigUtils.RingerMode.RINGER_MODE_SILENT;
        }
        return SoundConfigUtils.RingerMode.RINGER_MODE_VIBRATE;
    }

}
